<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>用户个人信息</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://code.jquery.com/jquery-3.0.0.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <link href="css/styleprofile.css" rel="stylesheet">
    <link rel="stylesheet" href="css/sw.css">

    <link type="text/css" rel="stylesheet" href="/fileinput/css/fileinput.css" />
    <script type="text/javascript" src="/fileinput/js/fileinput.js"></script>
    <script type="text/javascript" src="/fileinput/js/fileinput_locale_zh.js"></script>
    <script type="text/javascript" src="/fileinput/js/locales/zh.js"></script>
</head>
<body>
<div class="container">
    <form role="form" method="post" action="/myloadfile" enctype="multipart/form-data">
        <!--隐藏ID-->
        <input id="id" name="id" type="hidden" th:value="00">
        <div id="imgPreview" style="margin-top: 20px;position: relative;">
            <input type="file" class="file" multiple id="file" name='file' required='required'>
        </div>
        <!-- <div class="modal-footer" style="margin-top: 30px;">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="submit" class="btn btn-primary">提交更改</button>
    </div> -->
    </form>
    <br/><br/><br/><br/><br/><br/>
    <form role="form" method="post" action="/godownload" enctype="multipart/form-data">
        <div class="col-md-6">
            <div class="input-group">
                <span class="input-group-addon">UUID:</span>
                <input id="search" name="search" type="text" class="form-control" placeholder="文件的UUID">
            </div>
        </div>
        <div class="col-md-6">
            <button type="submit" class="btn btn-success">去下载</button>
        </div>
    </form>
    <br/><br/><br/>
    <table border="1" align="center"class="table table-hover">
        <thead>
        <th>id</th>
        <th>uuid</th>
        <th>文件名</th>
        <th>操作</th>
        </thead>
        <tbody>
        <tr th:each="temp,stat:${list}">
            <td th:text="${temp['id']}"></td>
            <td th:text="${temp['uuid']}"></td>
            <td th:text="${temp['filename']}"></td>
            <td align="center" >
                <a th:href="@{'/godownload?uuid='+${temp['uuid']}}">下载此文件</a>&nbsp;&nbsp;
            </td>
        </tr>
        </tbody>
    </table>
    <script type="text/javascript">
        $("#file").fileinput({
            language: 'zh' //设置语言为中文
        })
    </script>
</div>
</body>
</html>
